<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSuppliersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('c_suppliers', function (Blueprint $table) {
            $table->increments('id');
            $table->string('account','50')->default(null)->comment('账号');
            $table->string('pass','80')->default(null)->comment('密码');
            $table->string('user_name','80')->default(null)->comment('用户名称');
            $table->string('phone','11')->default(null)->comment('手机号');
            $table->string('front_card', 100)->default(null)->comment('身份证正面');
            $table->string('behind_card', 100)->default(null)->comment('身份证反面');
            $table->string('company', 100)->default(null)->comment('企业名称');
            $table->string('license_img', 100)->default(null)->comment('营业执照');
            $table->text('remark')->default(null)->comment('备注');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->integer('status')->default(0)->comment('状态0未审核1已通过2已驳回');
            $table->string('reject_reason',100)->default(0)->comment('状态0未审核1已通过2已驳回');
            $table->integer('admin_user')->default(0)->comment('审核人id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_suppliers');
    }
}
